<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Jetson Inference: Thread Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="NVLogo_2D.jpg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Jetson Inference
   </div>
   <div id="projectbrief">DNN Vision Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classThread.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classThread-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Thread Class Reference<div class="ingroups"><a class="el" href="group__util.html">Utilities Library (jetson-utils)</a> &raquo; <a class="el" href="group__threads.html">Multithreading</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classThread.html" title="Thread class for launching an asynchronous operating-system dependent thread.">Thread</a> class for launching an asynchronous operating-system dependent thread.  
 <a href="classThread.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="Thread_8h_source.html">Thread.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a95c703fb8f2f27cb64f475a8c940864a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a95c703fb8f2f27cb64f475a8c940864a">Thread</a> ()</td></tr>
<tr class="memdesc:a95c703fb8f2f27cb64f475a8c940864a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="classThread.html#a95c703fb8f2f27cb64f475a8c940864a">More...</a><br /></td></tr>
<tr class="separator:a95c703fb8f2f27cb64f475a8c940864a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a026b23628e1727050e864e00489c0baf"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a026b23628e1727050e864e00489c0baf">~Thread</a> ()</td></tr>
<tr class="memdesc:a026b23628e1727050e864e00489c0baf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="classThread.html#a026b23628e1727050e864e00489c0baf">More...</a><br /></td></tr>
<tr class="separator:a026b23628e1727050e864e00489c0baf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac852bc49c5bf8c2f448e4df85b1a4cae"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ac852bc49c5bf8c2f448e4df85b1a4cae">Run</a> ()</td></tr>
<tr class="memdesc:ac852bc49c5bf8c2f448e4df85b1a4cae"><td class="mdescLeft">&#160;</td><td class="mdescRight">User-implemented thread main() function.  <a href="classThread.html#ac852bc49c5bf8c2f448e4df85b1a4cae">More...</a><br /></td></tr>
<tr class="separator:ac852bc49c5bf8c2f448e4df85b1a4cae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a279c2b78aa2bf43371f2462623588830"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a279c2b78aa2bf43371f2462623588830">Start</a> ()</td></tr>
<tr class="memdesc:a279c2b78aa2bf43371f2462623588830"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the thread.  <a href="classThread.html#a279c2b78aa2bf43371f2462623588830">More...</a><br /></td></tr>
<tr class="separator:a279c2b78aa2bf43371f2462623588830"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af729f1405c5c2a4fb43bc5f4d249bedf"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#af729f1405c5c2a4fb43bc5f4d249bedf">Start</a> (<a class="el" href="group__threads.html#gaf5d0ae569fdc16f5708d68f64457ed79">ThreadEntryFunction</a> entry, void *user_param=NULL)</td></tr>
<tr class="memdesc:af729f1405c5c2a4fb43bc5f4d249bedf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start the thread, utilizing an entry function pointer provided by the user.  <a href="classThread.html#af729f1405c5c2a4fb43bc5f4d249bedf">More...</a><br /></td></tr>
<tr class="separator:af729f1405c5c2a4fb43bc5f4d249bedf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3e16995fb09c32004824ce8be5d11045"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a3e16995fb09c32004824ce8be5d11045">Stop</a> (bool wait=false)</td></tr>
<tr class="memdesc:a3e16995fb09c32004824ce8be5d11045"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal for the thread to stop running.  <a href="classThread.html#a3e16995fb09c32004824ce8be5d11045">More...</a><br /></td></tr>
<tr class="separator:a3e16995fb09c32004824ce8be5d11045"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04d3a576997c17f058273831630cc394"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a04d3a576997c17f058273831630cc394">GetPriorityLevel</a> ()</td></tr>
<tr class="memdesc:a04d3a576997c17f058273831630cc394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get this thread's priority level.  <a href="classThread.html#a04d3a576997c17f058273831630cc394">More...</a><br /></td></tr>
<tr class="separator:a04d3a576997c17f058273831630cc394"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46f5f8800a58219817127784c75ed1ba"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a46f5f8800a58219817127784c75ed1ba">SetPriorityLevel</a> (int priority)</td></tr>
<tr class="memdesc:a46f5f8800a58219817127784c75ed1ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set this thread's priority level.  <a href="classThread.html#a46f5f8800a58219817127784c75ed1ba">More...</a><br /></td></tr>
<tr class="separator:a46f5f8800a58219817127784c75ed1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92c0628fe5ba0bb5bd3845bfb9718dc5"><td class="memItemLeft" align="right" valign="top">pthread_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a92c0628fe5ba0bb5bd3845bfb9718dc5">GetThreadID</a> ()</td></tr>
<tr class="memdesc:a92c0628fe5ba0bb5bd3845bfb9718dc5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get thread identififer.  <a href="classThread.html#a92c0628fe5ba0bb5bd3845bfb9718dc5">More...</a><br /></td></tr>
<tr class="separator:a92c0628fe5ba0bb5bd3845bfb9718dc5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a786ef18c62603f0fe041e95391637740"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a786ef18c62603f0fe041e95391637740">LockAffinity</a> (unsigned int cpu)</td></tr>
<tr class="memdesc:a786ef18c62603f0fe041e95391637740"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock this thread to a CPU core.  <a href="classThread.html#a786ef18c62603f0fe041e95391637740">More...</a><br /></td></tr>
<tr class="separator:a786ef18c62603f0fe041e95391637740"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac1bccfcc9119d0c9f8dc95ef13175c74"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ac1bccfcc9119d0c9f8dc95ef13175c74">InitRealtime</a> ()</td></tr>
<tr class="memdesc:ac1bccfcc9119d0c9f8dc95ef13175c74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Prime the system for realtime use.  <a href="classThread.html#ac1bccfcc9119d0c9f8dc95ef13175c74">More...</a><br /></td></tr>
<tr class="separator:ac1bccfcc9119d0c9f8dc95ef13175c74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11087c8d97fc7b7c2ab37576acee61a3"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a11087c8d97fc7b7c2ab37576acee61a3">GetMaxPriority</a> ()</td></tr>
<tr class="memdesc:a11087c8d97fc7b7c2ab37576acee61a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the maximum priority level available.  <a href="classThread.html#a11087c8d97fc7b7c2ab37576acee61a3">More...</a><br /></td></tr>
<tr class="separator:a11087c8d97fc7b7c2ab37576acee61a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc90bfb74a4f32b717c681a6a073f70a"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#adc90bfb74a4f32b717c681a6a073f70a">GetMinPriority</a> ()</td></tr>
<tr class="memdesc:adc90bfb74a4f32b717c681a6a073f70a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the minimum priority level avaiable.  <a href="classThread.html#adc90bfb74a4f32b717c681a6a073f70a">More...</a><br /></td></tr>
<tr class="separator:adc90bfb74a4f32b717c681a6a073f70a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad69f498b3cbc8ec002238b74672b7aa2"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ad69f498b3cbc8ec002238b74672b7aa2">GetPriority</a> (pthread_t *thread=NULL)</td></tr>
<tr class="memdesc:ad69f498b3cbc8ec002238b74672b7aa2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the priority level of the thread.  <a href="classThread.html#ad69f498b3cbc8ec002238b74672b7aa2">More...</a><br /></td></tr>
<tr class="separator:ad69f498b3cbc8ec002238b74672b7aa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bebcec1fe0fc8b0c1e8010a15bf6493"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a4bebcec1fe0fc8b0c1e8010a15bf6493">SetPriority</a> (int priority, pthread_t *thread=NULL)</td></tr>
<tr class="memdesc:a4bebcec1fe0fc8b0c1e8010a15bf6493"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the priority level of the thread.  <a href="classThread.html#a4bebcec1fe0fc8b0c1e8010a15bf6493">More...</a><br /></td></tr>
<tr class="separator:a4bebcec1fe0fc8b0c1e8010a15bf6493"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3013f9ed28496e937143b9807ba6bd72"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a3013f9ed28496e937143b9807ba6bd72">Yield</a> (unsigned int ms)</td></tr>
<tr class="memdesc:a3013f9ed28496e937143b9807ba6bd72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Whatever thread you are calling from, yield the processor for the specified number of milliseconds.  <a href="classThread.html#a3013f9ed28496e937143b9807ba6bd72">More...</a><br /></td></tr>
<tr class="separator:a3013f9ed28496e937143b9807ba6bd72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b944c18ba34a7fdb04dd65c754b6366"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a8b944c18ba34a7fdb04dd65c754b6366">SetAffinity</a> (unsigned int cpu, pthread_t *thread=NULL)</td></tr>
<tr class="memdesc:a8b944c18ba34a7fdb04dd65c754b6366"><td class="mdescLeft">&#160;</td><td class="mdescRight">Lock the specified thread's affinity to a CPU core.  <a href="classThread.html#a8b944c18ba34a7fdb04dd65c754b6366">More...</a><br /></td></tr>
<tr class="separator:a8b944c18ba34a7fdb04dd65c754b6366"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca2de16d52730f2c5f247b816ed1a064"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#aca2de16d52730f2c5f247b816ed1a064">GetCPU</a> ()</td></tr>
<tr class="memdesc:aca2de16d52730f2c5f247b816ed1a064"><td class="mdescLeft">&#160;</td><td class="mdescRight">Look up which CPU core the thread is running on.  <a href="classThread.html#aca2de16d52730f2c5f247b816ed1a064">More...</a><br /></td></tr>
<tr class="separator:aca2de16d52730f2c5f247b816ed1a064"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a44f69c6f9bc3fe0899e48216d2dad3f6"><td class="memItemLeft" align="right" valign="top">static void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a44f69c6f9bc3fe0899e48216d2dad3f6">DefaultEntry</a> (void *param)</td></tr>
<tr class="separator:a44f69c6f9bc3fe0899e48216d2dad3f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a7599581878120ead1dd50636f3806afd"><td class="memItemLeft" align="right" valign="top">pthread_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a7599581878120ead1dd50636f3806afd">mThreadID</a></td></tr>
<tr class="separator:a7599581878120ead1dd50636f3806afd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab34c3d6ae645c5aed480b86855b9253c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ab34c3d6ae645c5aed480b86855b9253c">mThreadStarted</a></td></tr>
<tr class="separator:ab34c3d6ae645c5aed480b86855b9253c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classThread.html" title="Thread class for launching an asynchronous operating-system dependent thread.">Thread</a> class for launching an asynchronous operating-system dependent thread. </p>
<p>To make your own thread, provide a function pointer of the thread's entry point, or inherit from this class and implement your own <a class="el" href="classThread.html#ac852bc49c5bf8c2f448e4df85b1a4cae" title="User-implemented thread main() function.">Run()</a> function. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a95c703fb8f2f27cb64f475a8c940864a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a95c703fb8f2f27cb64f475a8c940864a">&#9670;&nbsp;</a></span>Thread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Thread::Thread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default constructor. </p>

</div>
</div>
<a id="a026b23628e1727050e864e00489c0baf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a026b23628e1727050e864e00489c0baf">&#9670;&nbsp;</a></span>~Thread()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Thread::~Thread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>
<p>Automatically stops the thread. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a44f69c6f9bc3fe0899e48216d2dad3f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a44f69c6f9bc3fe0899e48216d2dad3f6">&#9670;&nbsp;</a></span>DefaultEntry()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void* Thread::DefaultEntry </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>param</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aca2de16d52730f2c5f247b816ed1a064"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca2de16d52730f2c5f247b816ed1a064">&#9670;&nbsp;</a></span>GetCPU()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int Thread::GetCPU </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Look up which CPU core the thread is running on. </p>

</div>
</div>
<a id="a11087c8d97fc7b7c2ab37576acee61a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11087c8d97fc7b7c2ab37576acee61a3">&#9670;&nbsp;</a></span>GetMaxPriority()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int Thread::GetMaxPriority </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the maximum priority level available. </p>

</div>
</div>
<a id="adc90bfb74a4f32b717c681a6a073f70a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc90bfb74a4f32b717c681a6a073f70a">&#9670;&nbsp;</a></span>GetMinPriority()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int Thread::GetMinPriority </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the minimum priority level avaiable. </p>

</div>
</div>
<a id="ad69f498b3cbc8ec002238b74672b7aa2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad69f498b3cbc8ec002238b74672b7aa2">&#9670;&nbsp;</a></span>GetPriority()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int Thread::GetPriority </td>
          <td>(</td>
          <td class="paramtype">pthread_t *&#160;</td>
          <td class="paramname"><em>thread</em> = <code>NULL</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the priority level of the thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">thread</td><td>The thread, or if NULL, the currently running thread. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a04d3a576997c17f058273831630cc394"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04d3a576997c17f058273831630cc394">&#9670;&nbsp;</a></span>GetPriorityLevel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Thread::GetPriorityLevel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get this thread's priority level. </p>

</div>
</div>
<a id="a92c0628fe5ba0bb5bd3845bfb9718dc5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92c0628fe5ba0bb5bd3845bfb9718dc5">&#9670;&nbsp;</a></span>GetThreadID()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">pthread_t* Thread::GetThreadID </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get thread identififer. </p>

</div>
</div>
<a id="ac1bccfcc9119d0c9f8dc95ef13175c74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1bccfcc9119d0c9f8dc95ef13175c74">&#9670;&nbsp;</a></span>InitRealtime()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Thread::InitRealtime </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Prime the system for realtime use. </p>
<p>Mostly this is locking a large group of pages into memory. </p>

</div>
</div>
<a id="a786ef18c62603f0fe041e95391637740"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a786ef18c62603f0fe041e95391637740">&#9670;&nbsp;</a></span>LockAffinity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::LockAffinity </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>cpu</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Lock this thread to a CPU core. </p>

</div>
</div>
<a id="ac852bc49c5bf8c2f448e4df85b1a4cae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac852bc49c5bf8c2f448e4df85b1a4cae">&#9670;&nbsp;</a></span>Run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Thread::Run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>User-implemented thread main() function. </p>

</div>
</div>
<a id="a8b944c18ba34a7fdb04dd65c754b6366"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b944c18ba34a7fdb04dd65c754b6366">&#9670;&nbsp;</a></span>SetAffinity()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool Thread::SetAffinity </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>cpu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pthread_t *&#160;</td>
          <td class="paramname"><em>thread</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Lock the specified thread's affinity to a CPU core. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">cpu</td><td>The CPU core to lock the thread to. </td></tr>
    <tr><td class="paramname">thread</td><td>The thread, or if NULL, the currently running thread. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a4bebcec1fe0fc8b0c1e8010a15bf6493"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bebcec1fe0fc8b0c1e8010a15bf6493">&#9670;&nbsp;</a></span>SetPriority()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static int Thread::SetPriority </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">pthread_t *&#160;</td>
          <td class="paramname"><em>thread</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set the priority level of the thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">thread</td><td>The thread, or if NULL, the currently running thread. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a46f5f8800a58219817127784c75ed1ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a46f5f8800a58219817127784c75ed1ba">&#9670;&nbsp;</a></span>SetPriorityLevel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::SetPriorityLevel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set this thread's priority level. </p>

</div>
</div>
<a id="a279c2b78aa2bf43371f2462623588830"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a279c2b78aa2bf43371f2462623588830">&#9670;&nbsp;</a></span>Start() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::Start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the thread. </p>
<p>This will asynchronously call the <a class="el" href="classThread.html#ac852bc49c5bf8c2f448e4df85b1a4cae" title="User-implemented thread main() function.">Run()</a> function. </p><dl class="section return"><dt>Returns</dt><dd>False if an error occurred and the thread could not be started. </dd></dl>

</div>
</div>
<a id="af729f1405c5c2a4fb43bc5f4d249bedf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af729f1405c5c2a4fb43bc5f4d249bedf">&#9670;&nbsp;</a></span>Start() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::Start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__threads.html#gaf5d0ae569fdc16f5708d68f64457ed79">ThreadEntryFunction</a>&#160;</td>
          <td class="paramname"><em>entry</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>user_param</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start the thread, utilizing an entry function pointer provided by the user. </p>
<dl class="section return"><dt>Returns</dt><dd>False if an error occurred and the thread could not be started. </dd></dl>

</div>
</div>
<a id="a3e16995fb09c32004824ce8be5d11045"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3e16995fb09c32004824ce8be5d11045">&#9670;&nbsp;</a></span>Stop()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::Stop </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>wait</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Signal for the thread to stop running. </p>
<p>If wait is true, <a class="el" href="classThread.html#a3e16995fb09c32004824ce8be5d11045" title="Signal for the thread to stop running.">Stop()</a> will block until the thread has exited. </p>

</div>
</div>
<a id="a3013f9ed28496e937143b9807ba6bd72"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3013f9ed28496e937143b9807ba6bd72">&#9670;&nbsp;</a></span>Yield()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void Thread::Yield </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>ms</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Whatever thread you are calling from, yield the processor for the specified number of milliseconds. </p>
<p>Accuracy may vary wildly the lower you go, and depending on the platform. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a7599581878120ead1dd50636f3806afd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7599581878120ead1dd50636f3806afd">&#9670;&nbsp;</a></span>mThreadID</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">pthread_t Thread::mThreadID</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ab34c3d6ae645c5aed480b86855b9253c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab34c3d6ae645c5aed480b86855b9253c">&#9670;&nbsp;</a></span>mThreadStarted</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::mThreadStarted</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>jetson-utils/<a class="el" href="Thread_8h_source.html">Thread.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classThread.html">Thread</a></li>
    <li class="footer">Generated on Fri Mar 17 2023 14:29:30 for Jetson Inference by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
